package cn.kgc.fcm.dsbank.controller;

import cn.kgc.fcm.dsbank.entity.Employee;
import org.springframework.security.core.context.SecurityContext;
import org.springframework.security.core.context.SecurityContextHolder;

public class BaseController {

    public Employee getLoginedEmp(){
        Employee loginedEmp = (Employee) SecurityContextHolder.getContext().getAuthentication().getPrincipal();
        return loginedEmp;
    }
}
